# !/usr/bin/env python
"""
    models
    ~~~~~~~


    :Author: swq
    :Date: 2021/07/03 22:24
"""

from api.extensions import db
from api.utils.database import CRUDMixin


class Project(db.Model, CRUDMixin):
    __tablename__ = "pic_project"

    id = db.Column(db.Integer, primary_key=True)
    name = db.Column(db.String(255), unique=True, nullable=False)

    def to_dict(self):
        return {"id": self.id, "name": self.name}
